package com.design.备忘录模式;

import java.util.ArrayList;
import java.util.List;

public class CareTaker {

	private List<Memento> mementos = new ArrayList<>();
	
	public void add(Memento memento) {
		mementos.add(memento);
	}
	
	public Memento get(int index) {
		return mementos.get(index);
	}
	
	
	public void printMementosLength() {
		System.out.println("current mementos size :"+mementos.size());
	}
	
}
